import 'package:flutter/material.dart';
import 'package:loxen/viewmode/base_view_model.dart';


class BottomBarViewModel extends BaseViewModel {
  final PageController controller;
  int currentIndex = 0;
  int oldIndex = 0;

  BottomBarViewModel(this.controller);

  void changeIndex(int index) {
    oldIndex = currentIndex;
    currentIndex = index;
    controller.jumpToPage(index);
    notifyListeners();
  }
}